package com.gagakuai.bpm.demo;

import org.camunda.bpm.engine.delegate.DelegateExecution;
import org.camunda.bpm.engine.delegate.JavaDelegate;
import org.springframework.stereotype.Component;

/*
 * @program: bpm_server
 * @description: 任务发送回调
 * @author: houhong
 * @create: 2022-07-21 15:56
 */
@Component(value = "taskSendDelagte")
public class TaskSendDelagte implements JavaDelegate {


    @Override
    public void execute(DelegateExecution execution) throws Exception {

        execution.getProcessEngineServices()
                .getRuntimeService()
                .createMessageCorrelation("Message_recive")
                .processInstanceBusinessKey("messageBusinessKey")
                .correlate();
    }
}